Hi, |
Re: Basic understanding of skip help request
Sorry this is formatted odd, I did "preview" but could not fix it.
Skip skpGlobal = null
Skip MakeIt(whatever)
{ // caller should indeed 'delete' the returned Skip when finished.
Skip skp = createString()
put(skp, "January", something)
...
put(skp, "Decemeber", something)
return(skp)
}
void Whatever()
{
skpGlobal = MakeIt(whatever)
deal with it
delete(skpGlobal)
}
// Not much different:
void MakeIt(whatever, &Skip skp)
int Data // I don't know the type of Data, but it doesn't matter
string Key
for Data in skp do
{ Key = (string key skp)
delete(skp, Key) // Remove this KEY from the Skip
}
delete(skp) skp = createString()
I think there is an undocumented Skip "replace" perm:
|
Re: Basic understanding of skip help request llandale - Tue Mar 26 14:09:24 EDT 2013
Sorry this is formatted odd, I did "preview" but could not fix it.
Skip skpGlobal = null
Skip MakeIt(whatever)
{ // caller should indeed 'delete' the returned Skip when finished.
Skip skp = createString()
put(skp, "January", something)
...
put(skp, "Decemeber", something)
return(skp)
}
void Whatever()
{
skpGlobal = MakeIt(whatever)
deal with it
delete(skpGlobal)
}
// Not much different:
void MakeIt(whatever, &Skip skp)
int Data // I don't know the type of Data, but it doesn't matter
string Key
for Data in skp do
{ Key = (string key skp)
delete(skp, Key) // Remove this KEY from the Skip
}
delete(skp) skp = createString()
I think there is an undocumented Skip "replace" perm:
I'm going to have to study this a bit and write some test programs. Best, Frank |
Re: Basic understanding of skip help request llandale - Tue Mar 26 14:09:24 EDT 2013
Sorry this is formatted odd, I did "preview" but could not fix it.
Skip skpGlobal = null
Skip MakeIt(whatever)
{ // caller should indeed 'delete' the returned Skip when finished.
Skip skp = createString()
put(skp, "January", something)
...
put(skp, "Decemeber", something)
return(skp)
}
void Whatever()
{
skpGlobal = MakeIt(whatever)
deal with it
delete(skpGlobal)
}
// Not much different:
void MakeIt(whatever, &Skip skp)
int Data // I don't know the type of Data, but it doesn't matter
string Key
for Data in skp do
{ Key = (string key skp)
delete(skp, Key) // Remove this KEY from the Skip
}
delete(skp) skp = createString()
I think there is an undocumented Skip "replace" perm:
llandale - "The Skip is "allocated" globally even if the call is in a function." if that was true shouldn't the following code work?
Skip List1 = create ()
put(List1, 0, "List1")
void main()
{
Skip List2 = create ()
put(List2, 0, "List2")
string temp = null
for temp in List2 do {
string temp = null
for temp in List2 do {
print temp "\n"
}
}
}
main()
string temp = null
for temp in List1 do {
string temp = null
for temp in List1 do {
print temp "\n"
}
}
// DXL error
temp = null
for temp in List2 do {
string temp = null
for temp in List2 do {
print temp "\n"
}
}
|
Re: Basic understanding of skip help request SystemAdmin - Wed Mar 27 12:16:00 EDT 2013 llandale - "The Skip is "allocated" globally even if the call is in a function." if that was true shouldn't the following code work?
Skip List1 = create ()
put(List1, 0, "List1")
void main()
{
Skip List2 = create ()
put(List2, 0, "List2")
string temp = null
for temp in List2 do {
string temp = null
for temp in List2 do {
print temp "\n"
}
}
}
main()
string temp = null
for temp in List1 do {
string temp = null
for temp in List1 do {
print temp "\n"
}
}
// DXL error
temp = null
for temp in List2 do {
string temp = null
for temp in List2 do {
print temp "\n"
}
}
If we put two things in each Skip, this works:
Skip List1 = create ()
put(List1, 0, "List1-0")
put(List1, 1, "List1-1")
void main()
{
Skip List2 = create ()
put(List2, 0, "List2-0")
put(List2, 1, "List2-1")
string temp = null
for temp in List2 do {
string temp1 = null
for temp1 in List2 do {
print temp1 "\n"
}
}
}
main()
string temp = null
for temp in List1 do {
string temp = null
for temp in List1 do {
print temp "\n"
}
}
|
Re: Basic understanding of skip help request llandale - Wed Mar 27 15:55:11 EDT 2013 If we put two things in each Skip, this works:
Skip List1 = create ()
put(List1, 0, "List1-0")
put(List1, 1, "List1-1")
void main()
{
Skip List2 = create ()
put(List2, 0, "List2-0")
put(List2, 1, "List2-1")
string temp = null
for temp in List2 do {
string temp1 = null
for temp1 in List2 do {
print temp1 "\n"
}
}
}
main()
string temp = null
for temp in List1 do {
string temp = null
for temp in List1 do {
print temp "\n"
}
}
-Louie |